<style>
    .rich-panel-body {
        font-size: 13px;
    }
</style>
<f:view>
    <h:form>
        <h:outputText value="Posting in #{sessionBean.ejbSession.currentSite.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.gig==null}"/>
        <h:outputText value="Posting in #{gigBean.gig.site.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.gig!=null}"/>
        <h:outputText value=", #{gigBean.area.area}"  style="font-size: 20px; font-weight: bold;" rendered="#{gigBean.areaId>0}"/>
        <br/>
        <h:outputText value="#{gigBean.gig.title}"  style="font-size: 18px; font-weight: bold;"/>
        <h:outputText value=" - (#{gigBean.gig.location})"  style="font-size: 18px; font-weight: bold;" rendered="#{gigBean.gig.location!=null && gigBean.gig.location!=''}" />
        <rich:separator height="1"/>
        <h:outputText value="Reply to: "/>
        <h:outputLink value="mailto:#{gigBean.gig.email}" rendered="#{gigBean.gig.typeReplyTo=='real email'}">
            <h:outputText value="#{gigBean.gig.email}"></h:outputText>
        </h:outputLink>
        <h:outputText value="your anonymous eez2find address will appear here" style="font-style: italic;" rendered="#{sessionBean.ejbSession.gig==null && gigBean.gig.typeReplyTo=='masked email'}" />
        <h:outputLink value="mailto:gig-#{gigBean.gig.code}@eez2find.com" rendered="#{sessionBean.ejbSession.gig!=null && gigBean.gig.typeReplyTo=='masked email'}">
            <h:outputText value="gig-#{gigBean.gig.code}@eez2find.com"></h:outputText>
        </h:outputLink>
        <h:outputText value="see below" rendered="#{gigBean.gig.typeReplyTo=='any email'}" />
        <br/>
        <h:outputText value="Date: #{gigBean.toDay}"/>
        <rich:spacer height="20"/>
        <rich:panel style="width:700px; border-color:white;">
            ${gigBean.description}
        </rich:panel>
        <ul>
            <c:if test="${gigBean.gig.location!=null && gigBean.gig.location!=''}"><li><h:outputText value="Location: #{gigBean.gig.location}" /></li></c:if>
            <li><h:outputText value="Compensation: #{gigBean.gig.compensation}"/></li>
            <c:if test="${gigBean.gig.othersContact}"><li><h:outputText value="You may contact gig poster about other services, products or commercial interests." /></li></c:if>
            <c:if test="${!gigBean.gig.othersContact}"><li><h:outputText value="Please do not contact gig poster about other services, products or commercial interests." /></li></c:if>
        </ul>
        <rich:spacer height="10"/>
        <h:outputText value="Gig Code: #{gigBean.gig.code}" rendered="#{sessionBean.ejbSession.gig!=null}" />
    </h:form>
    <h:form>
        <h:messages globalOnly="true" style="color: red" styleClass="errorMessage"/>
        <h:panelGrid columns="2">
            <h:outputLink value="/site/faces/gigPosting/create.jsp" rendered="#{sessionBean.ejbSession.gig==null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:outputLink value="/site/faces/gigPosting/edit.jsp" rendered="#{sessionBean.ejbSession.gig!=null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:commandButton id="submitCreate" type="submit" value="Create" action="#{gigBean.create}" rendered="#{sessionBean.ejbSession.gig==null}"/>
            <h:commandButton id="submitUpdate" type="submit" value="Update" action="#{gigBean.update}" onclick="if(!confirm('Your Post has been edited. Are you sure?'))return false" rendered="#{sessionBean.ejbSession.gig!=null}" />
        </h:panelGrid>
    </h:form>
    <rich:separator height="1" />
</f:view>